package domain;
// Generated 08-jul-2009 21:19:33 by Hibernate Tools 3.2.1.GA


import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Mortgagecontract generated by hbm2java
 */
@Entity
@Table(name="mortgagecontract"
    ,catalog="domeco"
)
public class Mortgagecontract  implements java.io.Serializable {


     private Integer idMortgageContract;
     private Contract contract;
     private Date dateOfExpiration;
     private String company;
     private double total;
     private double interest;

    public Mortgagecontract() {
    }

	
    public Mortgagecontract(Date dateOfExpiration, double total, double interest) {
        this.dateOfExpiration = dateOfExpiration;
        this.total = total;
        this.interest = interest;
    }
    public Mortgagecontract(Contract contract, Date dateOfExpiration, String company, double total, double interest) {
       this.contract = contract;
       this.dateOfExpiration = dateOfExpiration;
       this.company = company;
       this.total = total;
       this.interest = interest;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="idMortgageContract", unique=true, nullable=false)
    public Integer getIdMortgageContract() {
        return this.idMortgageContract;
    }
    
    public void setIdMortgageContract(Integer idMortgageContract) {
        this.idMortgageContract = idMortgageContract;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="contractFK")
    public Contract getContract() {
        return this.contract;
    }
    
    public void setContract(Contract contract) {
        this.contract = contract;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="dateOfExpiration", nullable=false, length=10)
    public Date getDateOfExpiration() {
        return this.dateOfExpiration;
    }
    
    public void setDateOfExpiration(Date dateOfExpiration) {
        this.dateOfExpiration = dateOfExpiration;
    }
    
    @Column(name="company", length=250)
    public String getCompany() {
        return this.company;
    }
    
    public void setCompany(String company) {
        this.company = company;
    }
    
    @Column(name="total", nullable=false, precision=22, scale=0)
    public double getTotal() {
        return this.total;
    }
    
    public void setTotal(double total) {
        this.total = total;
    }
    
    @Column(name="interest", nullable=false, precision=22, scale=0)
    public double getInterest() {
        return this.interest;
    }
    
    public void setInterest(double interest) {
        this.interest = interest;
    }




}


